package plantshop.model;

import java.io.Serializable;

public class Opponent implements Serializable{
	private static final long serialVersionUID = -5096425607660971648L;
	private boolean gender;
	private String name;
	private int rating;
	private int money;
	
	public Opponent(boolean gender, String name){
		this.gender = gender;
		this.name = name;
		rating = 0;
		money = 0;
	}
	
	@Override
	public boolean equals(Object o){
		if(o instanceof Opponent){
			Opponent other = (Opponent)o;
			if(other.getName() == name && other.getGender() == gender)
				return true;
			return false;
		}
		return false;
	}

	public int getRating() {
		return rating;
	}

	public void setRating(int rating) {
		this.rating = rating;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public boolean getGender() {
		return gender;
	}

	public String getName() {
		return name;
	}
}
